<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        const promises = [ajax("/200接口"), ajax("/401接口")];
        Promise.allSettled(promises).then(results => {
            //过滤出成功的请求
            results.filter(item => item.status === "fulfilled");
            //过滤出失败的请求
            results.filter(item => item.status === "rejected");
        })
    </script>
</body>

</html>